#include <cstdio>
#include <cstring>

using namespace std;

const int maxn=100;

int n, a[maxn+1];

bool check(int x) {
    static int b[maxn+1];
    memcpy(b, a, sizeof a);
    int i, j, now;
    for (i=1, now=x; now && i<=n; i++) {
        for (; b[i]>=now && now; b[i]-=now, now--);
        if (!now) break;
        if (b[i]) return false;
    }
    for (j=n, now=x; now && j>0; j--) {
        for (; b[j]>=now && now; b[j]-=now, now--);
        if (!now) break;
        if (b[j]) return false;
    }

    if (i>j) return false;
    int sum=0;
    for (int k=1; k<=n; k++) {
        if (b[k]<0) return false;
        sum += b[k];
    }
    if (sum%2) return false;
    return true;
}

int main() {
#ifdef DEBUG
    freopen("src.in", "r", stdin);
    freopen("src.out", "w", stdout);
#endif

    scanf("%d", &n);
    for (int i=1; i<=n; i++) {
        scanf("%d", a+i);
    }

    if ((n==2 && a[1]==1 && a[2]==1) || (n==1 && a[1]==2)) {
        printf("1\n");
        return 0;
    }

    for (int i=a[1]; i>1; i--) {
        if (check(i)) {
            printf("%d\n", i);
            return 0;
        }
    }

    printf("no quotation\n");

    fclose(stdin);
    fclose(stdout);
    return 0;
}
